package com.ayu.scalalearn.chapter08

/**
  * @Author 徐林玉
  * @Description Test05MatchCaseObject
  * @Date 2022/8/26 10:24
  * @Version 1.0
  */
object Test05MatchCaseObject {

  def main(args: Array[String]): Unit = {

    val student = new StudentTest05("ayu", 18)

    val res = student match {

      case StudentTest05("ayu", 18) => "Studnet ayu"
      case _ => "else"
    }

    println(res)

  }

}

/**
  * 样例类
  *
  * @param name name
  * @param age  age
  */
case class StudentTest05(name: String, age: Int)
